<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	
	<link rel="stylesheet" type="text/css" href="../../css/base.css" />
	<link id="easyuiTheme"  rel="stylesheet" type="text/css" href="../../easy-ui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="../../easy-ui/themes/icon.css">
	<script type="text/javascript" src="../../easy-ui/jquery.min.js"></script>
	<script type="text/javascript" src="../../easy-ui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="../../js/base.js" ></script>
	<script type="text/javascript" src="../../js/ajaxfileupload.js" ></script>
</head>


<body class="easyui-layout" data-options="fit:true" style="overflow:hidden;">
	
		
								
								<!-- 表单提交-->
								<div data-options="region:'south',border:false," style="height:40px;text-align:center;">
		
									  <table style="width:100%;margin-top:8px;" >
													<tr>
													<td style="align:center;">
														<a href='javascript:void(-1);' style="margin-left: 180px;" onclick="baseFormSubmit();"; class="easyui-linkbutton" data-options="iconCls:'icon-save'">确定</a>&nbsp;&nbsp;
														<a href='javascript:void(-1);' onclick="baseFormReset();";  class="easyui-linkbutton" data-options="iconCls:'icon-back'">重置</a>
													</td>
													</tr>
										</table>
								</div>	
	
	
	

		
		<div data-options="region:'center',border:true,">
		
		<!-- the baseForm start  -->
		<form id="baseForm" name="baseForm" method="post" target="hiddenFrame" style="margin:0px;padding:0px;overflow:hidden;">
		
		<input id="id" name="id" type="hidden" /> 	
		<input  name="status"    id="status" type="hidden" ></input>
		
  			<table border="0" cellpadding="0" cellspacing="3" class="data-table">
			
			
				
			<!-- 表格的布局控制 -->
				<tr class="data-table-base-tr">
				<td  class="data-table-label" >
				</td>
				<td id="table_input_base" >
				</td>
				
				<td  class="data-table-right-margin"></td>
				</tr>
			
				<tr>
					<td  class="data-table-label">
					
					名称：<font color="#FF0000">*</font>
					</td>
					 <td class="data-table-input">
					<input  style="width:100%;" type="text" class="easyui-validatebox textbox" data-options="required:true,novalidate:true"  name="name"
					 id="name"></input>
					</td>
				</tr>
				<tr>
					<td  class="data-table-label">
					
					编码：<font color="#FF0000">*</font>
					</td>
					 <td class="data-table-input">
					<input  style="width:100%;" type="text" class="easyui-validatebox textbox" data-options="required:true,novalidate:true"  name="code"
					 id="code"></input>
					</td>
				</tr>
				<tr>
					<td  class="data-table-label">
					
					排序：<font color="#FF0000">*</font>
					</td>
					 <td class="data-table-input">
					<input  style="width:100%;" value="" type="text" class="easyui-validatebox textbox" data-options="required:true,novalidate:true"  name="sort"
					 id="sort"></input>
					</td>
				</tr>
				
				<tr>
				<td  class="data-table-label">
				
				状态：<font color="#FF0000">*</font>
				</td>
				 <td class="data-table-input">
				
				<input class="easyui-combobox" id="status_combobox" 
						data-options="valueField:'id',textField:'text',editable:false," style="width:100%;"/>
				
				</td>
				
				</tr>
				<tr>
					<td  class="data-table-label">
					
					备注：<font color="#FF0000">*</font>
					</td>
					 <td class="data-table-input">
					<textarea  rows=10  style="width:100%;overflow:auto;" class="textbox"  name="remarks"
				  id="remarks" ></textarea>
					</td>
				</tr>
				
				
             </table>

			</form>
			
			<!-- the dataForm end  -->
			
			
		</div>
	
	

	<script type="text/javascript">
		
		
	
	
		function initPage(){
			
			parent.showProgressing();
			//document.getElementById('busSystemId').value=parent.parent.mainFrame_id.selections[0].searchChiefSysId;
			//document.getElementById('parentId').value=parent.parent.mainFrame_id.selections[0].id;
			sendRequestAjax('../../zctag/initAdd.do?responseFunction=initAdd',initAdd);
		}
		
		
		window.onload=function(){
			 
			initPage();
		}
		
		var responseResultPage;
		function initAdd(responseResult){
		
			
			setFormDefault(responseResult); 
			responseResultPage=responseResult;
			
//			alert(responseResult[0].entity.parentId)
			
			$('#status_combobox').combobox({
			  		data: [{id:'0',text:'无效'},{id:'1',text:'正常'}],
			  		value:responseResult.entity.status,
			  		width:parseInt($("#table_input_base")[0].offsetWidth)+2,
			  		onSelect: function(record){
				  			document.getElementById("status").value=record.id;
					}
			});
			
			
			parent.closeProgressing();  
		}
	
		//form表单 提交 重置 提交后响应处理 ----------------
		function baseFormSubmit(){
			var flag= $("#baseForm").form('enableValidation').form('validate');
		    if(flag){

				parent.showProgressing();
				sendRequestAjax('../../zctag/addSave.do?responseFunction=addSave',addSave);
		    }
		}
		
		function baseFormReset(){
			 initAdd(responseResultPage);  
		}
		
		function addSave(responseResult){
			parent.parent.mainFrame_id.reloadPageData();
			
			if(responseResult.slide_msg_key==1){
				parent.parent.showSlideMsg(responseResult.slide_msg_message_key);
			}
			curWinClose();
		}
		//form表单 提交 重置 提交后响应处理结束 ------------
		
		
	
	</script>



</body>
</html>